package com.mzy.javaapi.enums;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/6/16 9:32
 * @Version 1.0
 */

/**
 * values()
 */
public class ConfigEnumTest {
    public static void main(String[] args) {
        ConfigEnum configEnum = ConfigEnum.valueOf("V1");

        ConfigEnum oldConfVersionTem = null;
        ConfigEnum ConfVersionTem = null;
        for (ConfigEnum item :
                ConfigEnum.values()) {
            if (1 == item.getOrder())
                oldConfVersionTem = item;
            if (1 == item.getOrder())
                ConfVersionTem=item;
        }
        System.out.println(oldConfVersionTem);
        System.out.println(ConfVersionTem);

    }
}
